// 基础样式定义
@use 'sass:color';
@use 'variables' as *;
@use 'mixins' as *;

// 重置样式
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'InterTight', sans-serif;
}

html {
  font-size: $base-font-size; // 14px 基准
  // scroll-behavior: smooth;

  // 响应式字体大小
  @include respond-to(sm) {
    font-size: 15px;
  }

  @include respond-to(md) {
    font-size: 16px;
  }

  @include respond-to(lg) {
    font-size: 17px;
  }

  @include respond-to(xl) {
    font-size: 18px;
  }
}

body {
  line-height: 1.6;
  color: $primary-text-color;
  background-color: $primary-bg-color;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  // min-width: 1440px;
  // overflow-x: hidden;
}

// 链接样式
a {
  color: $primary-color;
  text-decoration: none;
  transition: color 0.3s ease;

  &:hover {
    color: color.adjust($primary-color, $lightness: 10%);
  }
}

// 标题样式
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: $spacing-md;
}

h1 {
  @include responsive-font-size($font-size-2xl, $font-size-3xl, $font-size-4xl, $font-size-5xl);
}

h2 {
  @include responsive-font-size($font-size-xl, $font-size-2xl, $font-size-3xl, $font-size-4xl);
}

h3 {
  @include responsive-font-size($font-size-lg, $font-size-xl, $font-size-2xl, $font-size-3xl);
}

h4 {
  @include responsive-font-size($font-size-base, $font-size-lg, $font-size-xl, $font-size-2xl);
}

h5 {
  @include responsive-font-size($font-size-sm, $font-size-base, $font-size-lg, $font-size-xl);
}

h6 {
  @include responsive-font-size($font-size-xs, $font-size-sm, $font-size-base, $font-size-lg);
}

// 段落样式
p {
  margin-bottom: $spacing-md;
  color: $secondary-text-color;
}

// 列表样式
ul,
ol {
  margin-bottom: $spacing-md;
  padding-left: $spacing-lg;
}

li {
  margin-bottom: $spacing-xs;
}

// 图片样式
img {
  max-width: 100%;
  height: auto;
  display: block;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: $secondary-bg-color;
}

::-webkit-scrollbar-thumb {
  background: $card-bg-color;
  border-radius: 4px;

  &:hover {
    background: color.adjust($card-bg-color, $lightness: 10%);
  }
}

// 选择文本样式
::selection {
  background-color: rgba($primary-color, 0.3);
  color: $primary-text-color;
}

// 弹窗遮罩层
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}
